#include "stdafx.h"
int main2(int argc,char **argv) 
{ 
  InitializeMagick(*argv);

  // Read GIF file from disk 
  Image image( "giraffe.gif" );
  // Write to BLOB in JPEG format 
  Blob blob; 
  image.magick( "JPEG" ) ;// Set JPEG output format 
  image.write( &blob );

 // [ Use BLOB data (in JPEG format) here ]

  return 0; 
}